package task1;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-11
 * Time:20:04
 */
public class TestDemo7 {
    public static void copyOf(int[] src,int[] dst){
        for (int i = 0; i < src.length; i++) {
            dst[i]=src[i];
        }
    }
    public static void main(String[] args) {
        int[] arr1={1,2,3,4,5,6,7,8};
        int[] arr2=new int[8];
        copyOf(arr1,arr2);
        System.out.println(Arrays.toString(arr2));
    }
}
